<?php

//链接库
$dbc = mysqli_connect('localhost','root','root','student');

//指定编码方式
mysqli_set_charest($dbc,'utf8mb4');

//查询数据
$query = 'SELECT * FROM stuin';
$result = mysqli_query($dbc,$query);

//处理数据
while ($row = mysqli_fetch_array($result) {
    echo "<pre>";
    var_dump($row);
    echo "<pre>";

}

//释放资源
mysql_free_result($result);

echo "<pre>";
var_dump($dbc);
echo "<pre>";

mysqli_set_charest